<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="Hexo Theme Keep">
    <meta name="description" content="Hexo Theme Keep">
    <meta name="author" content="jianyu">
    
    <title>
        
            Kaios PowerManager API详解 |
        
        gyu&#39;s 时光
    </title>
    
<link rel="stylesheet" href="/css/style.css">

    <link rel="shortcut icon" href="/images/logo.svg">
    
<link rel="stylesheet" href="/css/font-awesome.min.css">

    <script id="hexo-configurations">
    let KEEP = window.KEEP || {};
    KEEP.hexo_config = {"hostname":"gyu.gitee.io","root":"/","language":"zh-CN","path":"search.xml"};
    KEEP.theme_config = {"toc":{"enable":true,"number":true,"expand_all":true,"init_open":true},"style":{"primary_color":"#0066CC","avatar":"https://cdn.jsdelivr.net/gh/XPoet/image-hosting@master/common-use/avatar.jpg","favicon":"/images/logo.svg","article_img_align":"left","left_side_width":"260px","content_max_width":"920px","hover":{"shadow":true,"scale":false},"first_screen":{"enable":true,"background_img":"/images/bg.svg","description":"只要开始，一切都来得及."},"scroll":{"progress_bar":{"enable":true},"percent":{"enable":true}}},"local_search":{"enable":true,"preload":true},"code_copy":{"enable":true,"style":"default"},"pjax":{"enable":false},"lazyload":{"enable":false},"version":"3.4.2"};
    KEEP.language_ago = {"second":"%s 秒前","minute":"%s 分钟前","hour":"%s 小时前","day":"%s 天前","week":"%s 周前","month":"%s 月前","year":"%s 年前"};
  </script>
<meta name="generator" content="Hexo 5.4.0"></head>


<body>
<div class="progress-bar-container">
    
        <span class="scroll-progress-bar"></span>
    

    
</div>


<main class="page-container">

    

    <div class="page-main-content">

        <div class="page-main-content-top">
            <header class="header-wrapper">

    <div class="header-content">
        <div class="left">
            <a class="logo-title" href="/">
                gyu&#39;s 时光
            </a>
        </div>

        <div class="right">
            <div class="pc">
                <ul class="menu-list">
                    
                        <li class="menu-item">
                            <a class=""
                               href="/"
                            >
                                首页
                            </a>
                        </li>
                    
                        <li class="menu-item">
                            <a class=""
                               href="/archives"
                            >
                                归档
                            </a>
                        </li>
                    
                        <li class="menu-item">
                            <a class=""
                               href="/categories"
                            >
                                分类
                            </a>
                        </li>
                    
                        <li class="menu-item">
                            <a class=""
                               href="/tags"
                            >
                                标签
                            </a>
                        </li>
                    
                    
                        <li class="menu-item search search-popup-trigger">
                            <i class="fas fa-search"></i>
                        </li>
                    
                </ul>
            </div>
            <div class="mobile">
                
                    <div class="icon-item search search-popup-trigger"><i class="fas fa-search"></i></div>
                
                <div class="icon-item menu-bar">
                    <div class="menu-bar-middle"></div>
                </div>
            </div>
        </div>
    </div>

    <div class="header-drawer">
        <ul class="drawer-menu-list">
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/">首页</a>
                </li>
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/archives">归档</a>
                </li>
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/categories">分类</a>
                </li>
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/tags">标签</a>
                </li>
            
        </ul>
    </div>

    <div class="window-mask"></div>

</header>


        </div>

        <div class="page-main-content-middle">

            <div class="main-content">

                
                    <div class="fade-in-down-animation">
    <div class="article-content-container">

        <div class="article-title">
            <span class="title-hover-animation">Kaios PowerManager API详解</span>
        </div>

        
            <div class="article-header">
                <div class="avatar">
                    <img src="https://cdn.jsdelivr.net/gh/XPoet/image-hosting@master/common-use/avatar.jpg">
                </div>
                <div class="info">
                    <div class="author">
                        <span class="name">jianyu</span>
                        
                            <span class="author-label">Engineer</span>
                        
                    </div>
                    <div class="meta-info">
                        <div class="article-meta-info">
    <span class="article-date article-meta-item">
        <i class="fas fa-edit"></i>&nbsp;2021-06-08 22:18:32
    </span>
    
        <span class="article-categories article-meta-item">
            <i class="fas fa-folder"></i>&nbsp;
            <ul>
                
                    <li>
                        <a href="/categories/Kaios/">Kaios</a>&nbsp;
                    </li>
                
            </ul>
        </span>
    
    
        <span class="article-tags article-meta-item">
            <i class="fas fa-tags"></i>&nbsp;
            <ul>
                
                    <li>
                        <a href="/tags/gecko/">gecko</a>&nbsp;
                    </li>
                
            </ul>
        </span>
    

    
    
    
    
</div>

                    </div>
                </div>
            </div>
        

        <div class="article-content markdown-body">
            <p>Q. PowerManager interface for KaiOS3.0介绍<br>背景：</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">On KaiOS 2.X, The PowerManager has implementation </span><br><span class="line">&quot;gecko&#x2F;dom&#x2F;power&#x2F;PowerManager.cpp&quot; while supports </span><br><span class="line">interfaces like &quot;SetKeyLightBrightness&quot; to connect </span><br><span class="line">js invoker and hal implementation.</span><br><span class="line"> </span><br><span class="line"> On KaiOS 3.0, I can not find anything like </span><br><span class="line"> &quot;SetKeyLightBrightness&quot; in dom or hal. </span><br><span class="line"> What&#39;s the new mechanism about PowerManager on KaiOS 3.0? </span><br></pre></td></tr></table></figure>
<h3 id="一．Kai3-0-PowerManager引入新机制-api-daemon"><a href="#一．Kai3-0-PowerManager引入新机制-api-daemon" class="headerlink" title="一．Kai3.0 PowerManager引入新机制(api-daemon)"></a>一．Kai3.0 PowerManager引入新机制(api-daemon)</h3><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">The implementation of PowerManager has been refactored on KaiOS 3.0 </span><br><span class="line"></span><br><span class="line">note:</span><br><span class="line">The specific implementation logic is in APi-daemon(written in &#39;Rust&#39; language ), </span><br><span class="line">this part of the code is not open to the outside world.</span><br><span class="line"></span><br><span class="line">eg:</span><br><span class="line">sidl&#x2F;services&#x2F;powermanager&#x2F;src&#x2F;service.rs</span><br><span class="line"></span><br><span class="line">    fn set_key_light_brightness(&amp;mut self, value: i64) &#123;</span><br><span class="line">        self.shared_obj.lock().key_light_brightness &#x3D; value;</span><br><span class="line">        let clamped &#x3D; if value &lt; 0 &#123;</span><br><span class="line">            0</span><br><span class="line">        &#125; else if value &gt; 100 &#123;</span><br><span class="line">            100</span><br><span class="line">        &#125; else &#123;</span><br><span class="line">            value</span><br><span class="line">        &#125;;</span><br><span class="line">        self.inner.set_key_light_brightness(clamped as _);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">So, for kaios users, there is no need to pay attention to the internal implementation of api-daemon. </span><br><span class="line"></span><br><span class="line">Call the API interface at the gaia layer, refer to: </span><br><span class="line">gaia&#x2F;apps&#x2F;system&#x2F;src&#x2F;keypad_backlight_manager.js</span><br><span class="line">gaia&#x2F;apps&#x2F;shared&#x2F;js&#x2F;session&#x2F;power_manager&#x2F;power_manager.js</span><br><span class="line">gaia&#x2F;apps&#x2F;shared&#x2F;js&#x2F;session&#x2F;README.md</span><br></pre></td></tr></table></figure>

<h3 id="二．相关配置及细节"><a href="#二．相关配置及细节" class="headerlink" title="二．相关配置及细节"></a>二．相关配置及细节</h3><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">On kaios 3.0 The gaia layer calls api-daemon api and then changes the node value through (android.hardware.light@2.0) </span><br><span class="line"></span><br><span class="line">refer code:</span><br><span class="line">impl ILight &#123;</span><br><span class="line">    pub fn get_service(service_name: &amp;str) -&gt; Option&lt;ILight&gt; &#123;</span><br><span class="line">        let ret &#x3D; hidl::IBinder::query_service_manager(</span><br><span class="line">            &quot;android.hardware.light@2.0::ILight&quot;,</span><br><span class="line">            service_name,</span><br><span class="line">        );</span><br><span class="line">       &#x2F;&#x2F;.....</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">adb shell ps</span><br><span class="line">system     1671     1   11136   1592 binder_ioctl_write_read 0 S android.hardware.light@2.0-service-lazy</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">After debug the code flow, there is no issue.</span><br><span class="line">note: you should change the file owner and group to &#39;system&#39; .</span><br><span class="line"></span><br><span class="line">(-rw-r--r-- 1 system system 4096 1970-01-01 00:00 brightness )</span><br><span class="line"></span><br><span class="line">current device:</span><br><span class="line">WND:&#x2F;sys&#x2F;class&#x2F;leds&#x2F;button-backlight # ls -al</span><br><span class="line">total 0</span><br><span class="line">drwxr-xr-x 3 root root    0 1970-01-01 21:32 .</span><br><span class="line">drwxr-xr-x 3 root root    0 1970-01-01 21:32 ..</span><br><span class="line">-rw-r--r-- 1 root root 4096 1970-01-01 00:00 brightness</span><br><span class="line">lrwxrwxrwx 1 root root    0 1970-01-01 21:32 device -&gt; ..&#x2F;..&#x2F;..&#x2F;200f000.qcom,spmi:pm8916@0:qcom,leds@c300</span><br><span class="line">-rw-r--r-- 1 root root 4096 1970-01-01 21:32 max_brightness</span><br><span class="line">drwxr-xr-x 2 root root    0 1970-01-01 21:32 power</span><br><span class="line">lrwxrwxrwx 1 root root    0 1970-01-01 21:32 subsystem -&gt; ..&#x2F;..&#x2F;..&#x2F;..&#x2F;..&#x2F;..&#x2F;..&#x2F;..&#x2F;..&#x2F;class&#x2F;leds</span><br><span class="line">-rw-r--r-- 1 root root 4096 1970-01-01 21:32 trigger</span><br><span class="line">-rw-r--r-- 1 root root 4096 1970-01-01 21:32 uevent</span><br><span class="line"></span><br><span class="line">refer code:   </span><br><span class="line">-system&#x2F;core&#x2F;rootdir&#x2F;init.rc</span><br><span class="line"></span><br><span class="line">chown system system &#x2F;sys&#x2F;class&#x2F;leds&#x2F;button-backlight&#x2F;brightness</span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h3 id="三．screenEnable｜setscreenbrighness代码调用逻辑"><a href="#三．screenEnable｜setscreenbrighness代码调用逻辑" class="headerlink" title="三．screenEnable｜setscreenbrighness代码调用逻辑"></a>三．screenEnable｜setscreenbrighness代码调用逻辑</h3><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">3.1：screenEnable流程</span><br><span class="line"></span><br><span class="line">system-&gt;调api-daemon -&gt;调GeckoBridgeService－&gt;掉gekco（xpcom）-&gt;调hal</span><br><span class="line">code flow:</span><br><span class="line"></span><br><span class="line">sidl&#x2F;services&#x2F;powermanager&#x2F;src&#x2F;service.rs</span><br><span class="line">- fn screen_enabled(&amp;mut self, state: bool, is_external: bool) -&gt; bool &#123;</span><br><span class="line">  -- self.inner.set_screen_state(state, if is_external &#123; 1 &#125; else &#123; 0 &#125;)</span><br><span class="line">sidl&#x2F;services&#x2F;powermanager&#x2F;src&#x2F;platform&#x2F;android&#x2F;mod.rs</span><br><span class="line">       ---fn set_screen_state(&amp;mut self, state: bool, screen_id: u8) -&gt; bool &#123;</span><br><span class="line">          ----let bridge &#x3D; GeckoBridgeService::shared_state();</span><br><span class="line">sidl&#x2F;services&#x2F;geckobridge&#x2F;src&#x2F;state.rs           </span><br><span class="line">             -----pub fn powermanager_set_screen_enabled(</span><br><span class="line">gecko&#x2F;b2g&#x2F;components&#x2F;GeckoBridge.jsm</span><br><span class="line">gecko&#x2F;b2g&#x2F;sidl&#x2F;PowerManagerDelegate.cpp</span><br><span class="line">                -----PowerManagerDelegateService::SetScreenEnabled(bool enabled, bool isExternalScreen) &#123;</span><br><span class="line">                       if (isExternalScreen) &#123;</span><br><span class="line">                         hal::SetExtScreenEnabled(enabled);</span><br><span class="line">                       &#125; else &#123;</span><br><span class="line">                         hal::SetScreenEnabled(enabled);</span><br><span class="line">                       &#125;</span><br><span class="line">                       return NS_OK;</span><br><span class="line">                     &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">3.2：setscreenbrighness流程</span><br><span class="line"></span><br><span class="line">system-&gt;调api-daemon-&gt;android.hardware.light@2.0-service-lazy（HIDL）</span><br><span class="line"></span><br><span class="line">＞sidl&#x2F;services&#x2F;powermanager&#x2F;src&#x2F;service.rs</span><br><span class="line">    fn set_key_light_brightness(&amp;mut self, value: i64) &#123;</span><br><span class="line">        self.shared_obj.lock().key_light_brightness &#x3D; value;</span><br><span class="line">        let clamped &#x3D; if value &lt; 0 &#123;</span><br><span class="line">            0</span><br><span class="line">        &#125; else if value &gt; 100 &#123;</span><br><span class="line">            100</span><br><span class="line">        &#125; else &#123;</span><br><span class="line">            value</span><br><span class="line">        &#125;;</span><br><span class="line">        self.inner.set_key_light_brightness(clamped as _);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">＞sidl&#x2F;services&#x2F;powermanager&#x2F;src&#x2F;platform&#x2F;android&#x2F;mod.rs</span><br><span class="line"></span><br><span class="line">    fn set_key_light_brightness(&amp;mut self, value: u8) &#123;</span><br><span class="line">        let val &#x3D; ((value as f32 * 255.0) &#x2F; (100.0)).round() as u32;</span><br><span class="line">        let color &#x3D; 0xff00_0000 + (val &lt;&lt; 16) + (val &lt;&lt; 8) + val;</span><br><span class="line"></span><br><span class="line">        let light_state &#x3D; light::LightState &#123;</span><br><span class="line">            color,</span><br><span class="line">            flash_mode: FLASH_NONE,</span><br><span class="line">            flash_on_ms: 0,</span><br><span class="line">            flash_off_ms: 0,</span><br><span class="line">            brightness_mode: BRIGHTNESS_USER,</span><br><span class="line">        &#125;;</span><br><span class="line"></span><br><span class="line">        if self.ensure_service() &#123;</span><br><span class="line">            let s &#x3D; &amp;self.light_service.as_ref().unwrap();</span><br><span class="line">            let _ &#x3D; s.set_light(TYPE_BUTTONS, &amp;light_state);</span><br><span class="line">            let _ &#x3D; s.set_light(TYPE_KEYBOARD, &amp;light_state);</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">＞sidl&#x2F;support&#x2F;light&#x2F;src&#x2F;lib.rs</span><br><span class="line">impl ILight &#123;</span><br><span class="line">    pub fn get_service(service_name: &amp;str) -&gt; Option&lt;ILight&gt; &#123;</span><br><span class="line">        let ret &#x3D; hidl::IBinder::query_service_manager(</span><br><span class="line">            &quot;android.hardware.light@2.0::ILight&quot;,</span><br><span class="line">            service_name,</span><br><span class="line">        );</span><br><span class="line">       &#x2F;&#x2F;.....</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">sidl&#x2F;support&#x2F;android-utils&#x2F;src&#x2F;system.rs</span><br><span class="line">brightness节点：</span><br><span class="line">const CONTROL_PATH: &amp;str &#x3D; &quot;&#x2F;sys&#x2F;class&#x2F;leds&#x2F;sublcd-backlight&#x2F;brightness&quot;;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h3 id="四．开启子屏的相关配置"><a href="#四．开启子屏的相关配置" class="headerlink" title="四．开启子屏的相关配置"></a>四．开启子屏的相关配置</h3><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">4.1：gecko&#x2F;b2g&#x2F;app&#x2F;b2g.js</span><br><span class="line">&#x2F;&#x2F; Multi-screen</span><br><span class="line">pref(&quot;b2g.multiscreen.enabled&quot;, true);</span><br><span class="line">pref(&quot;b2g.multiscreen.chrome_remote_url&quot;, &quot;chrome:&#x2F;&#x2F;b2g&#x2F;content&#x2F;shell_remote.html&quot;);</span><br><span class="line">pref(&quot;b2g.multiscreen.system_remote_url&quot;, &quot;chrome:&#x2F;&#x2F;system&#x2F;content&#x2F;index_remote.html&quot;);</span><br><span class="line">pref(&quot;toolkit.multiscreen.defaultChromeFeatures&quot;, &quot;chrome,dialog&#x3D;no,close,resizable,scrollbars,extrachrome&quot;);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">4.2：gecko&#x2F;b2g&#x2F;components&#x2F;MultiscreenHandler.jsm </span><br><span class="line"></span><br><span class="line">  openTopLevelWindow: function openTopLevelWindow(aDisplay) &#123;</span><br><span class="line">    if (this.topLevelWindows.get(aDisplay.id)) &#123;</span><br><span class="line">      debug(</span><br><span class="line">        &quot;Top level window for display id: &quot; + aDisplay.id + &quot; has been opened.&quot;</span><br><span class="line">      );</span><br><span class="line">      return;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    let flags &#x3D;</span><br><span class="line">      Services.prefs.getCharPref(&quot;toolkit.multiscreen.defaultChromeFeatures&quot;) +</span><br><span class="line">      &quot;,mozDisplayId&#x3D;&quot; +</span><br><span class="line">      aDisplay.id;</span><br><span class="line">    let remoteShellURL &#x3D;</span><br><span class="line">      Services.prefs.getCharPref(&quot;b2g.multiscreen.chrome_remote_url&quot;) +</span><br><span class="line">      &quot;#&quot; +</span><br><span class="line">      aDisplay.id;</span><br><span class="line">    let win &#x3D; Services.ww.openWindow(</span><br><span class="line">      null,</span><br><span class="line">      remoteShellURL,</span><br><span class="line">      &quot;myTopWindow&quot; + aDisplay.id,</span><br><span class="line">      flags,</span><br><span class="line">      null</span><br><span class="line">    );</span><br><span class="line"></span><br><span class="line">    this.topLevelWindows.set(aDisplay.id, win);</span><br><span class="line">  &#125;,</span><br></pre></td></tr></table></figure>
        </div>

        
            <div class="post-copyright-info">
                <div class="article-copyright-info-container">
    <ul>
        <li>
            版权声明：本博客所有文章除特别声明外，均采用 <a class="license" target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">BY-NC-SA</a> 许可协议。转载请注明出处！
        </li>
    </ul>
</div>

            </div>
        

        
            <div class="article-nav">
                
                    <div class="article-prev">
                        <a class="prev"
                           rel="prev"
                           href="/2021/07/09/Fota%E7%9B%B8%E5%85%B3%E7%9F%A5%E8%AF%86%E6%A2%B3%E7%90%86/"
                        >
                            <span class="left arrow-icon flex-center">
                              <i class="fas fa-chevron-left"></i>
                            </span>
                            <span class="title flex-center">
                                <span class="post-nav-title-item">Fota相关知识梳理</span>
                                <span class="post-nav-item">上一篇</span>
                            </span>
                        </a>
                    </div>
                
                
                    <div class="article-next">
                        <a class="next"
                           rel="next"
                           href="/2021/05/05/Kaios_usb%20Mode/"
                        >
                            <span class="title flex-center">
                                <span class="post-nav-title-item">Kaios:分析usb Mode切换,状态变化的底层逻辑</span>
                                <span class="post-nav-item">下一篇</span>
                            </span>
                            <span class="right arrow-icon flex-center">
                              <i class="fas fa-chevron-right"></i>
                            </span>
                        </a>
                    </div>
                
            </div>
        

        
    </div>
</div>


                
            </div>

        </div>

        <div class="page-main-content-bottom">
            <footer class="footer">
    <div class="info-container">
        <div class="copyright-info info-item">
            &copy;
            
              <span>2018</span>&nbsp;-&nbsp;
            
            2021&nbsp;<i class="fas fa-heart icon-animate"></i>&nbsp;<a href="/">jianyu</a>
        </div>
        
        
    </div>
</footer>

        </div>
    </div>

    
        <div class="post-tools">
            <div class="post-tools-container">
    <ul class="tools-list">
        <!-- TOC aside toggle -->
        
            <li class="tools-item page-aside-toggle">
                <i class="fas fa-outdent"></i>
            </li>
        

        <!-- go comment -->
        
    </ul>
</div>

        </div>
    

    <div class="right-bottom-side-tools">
        <div class="side-tools-container">
    <ul class="side-tools-list">
        <li class="tools-item tool-font-adjust-plus flex-center">
            <i class="fas fa-search-plus"></i>
        </li>

        <li class="tools-item tool-font-adjust-minus flex-center">
            <i class="fas fa-search-minus"></i>
        </li>

        <li class="tools-item tool-expand-width flex-center">
            <i class="fas fa-arrows-alt-h"></i>
        </li>

        <li class="tools-item tool-dark-light-toggle flex-center">
            <i class="fas fa-moon"></i>
        </li>

        <!-- rss -->
        

        

        <li class="tools-item tool-scroll-to-bottom flex-center">
            <i class="fas fa-arrow-down"></i>
        </li>
    </ul>

    <ul class="exposed-tools-list">
        <li class="tools-item tool-toggle-show flex-center">
            <i class="fas fa-cog fa-spin"></i>
        </li>
        
            <li class="tools-item tool-scroll-to-top flex-center">
                <i class="arrow-up fas fa-arrow-up"></i>
                <span class="percent"></span>
            </li>
        
    </ul>
</div>

    </div>

    
        <aside class="page-aside">
            <div class="post-toc-wrap">
    <div class="post-toc">
        <ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%80%EF%BC%8EKai3-0-PowerManager%E5%BC%95%E5%85%A5%E6%96%B0%E6%9C%BA%E5%88%B6-api-daemon"><span class="nav-number">1.</span> <span class="nav-text">一．Kai3.0 PowerManager引入新机制(api-daemon)</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BA%8C%EF%BC%8E%E7%9B%B8%E5%85%B3%E9%85%8D%E7%BD%AE%E5%8F%8A%E7%BB%86%E8%8A%82"><span class="nav-number">2.</span> <span class="nav-text">二．相关配置及细节</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%89%EF%BC%8EscreenEnable%EF%BD%9Csetscreenbrighness%E4%BB%A3%E7%A0%81%E8%B0%83%E7%94%A8%E9%80%BB%E8%BE%91"><span class="nav-number">3.</span> <span class="nav-text">三．screenEnable｜setscreenbrighness代码调用逻辑</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%9B%9B%EF%BC%8E%E5%BC%80%E5%90%AF%E5%AD%90%E5%B1%8F%E7%9A%84%E7%9B%B8%E5%85%B3%E9%85%8D%E7%BD%AE"><span class="nav-number">4.</span> <span class="nav-text">四．开启子屏的相关配置</span></a></li></ol>
    </div>
</div>
        </aside>
    

    <div class="image-viewer-container">
    <img src="">
</div>


    
        <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
          <span class="search-input-field-pre">
            <i class="fas fa-keyboard"></i>
          </span>
            <div class="search-input-container">
                <input autocomplete="off"
                       autocorrect="off"
                       autocapitalize="off"
                       placeholder="搜索..."
                       spellcheck="false"
                       type="search"
                       class="search-input"
                >
            </div>
            <span class="popup-btn-close">
                <i class="fas fa-times"></i>
            </span>
        </div>
        <div id="search-result">
            <div id="no-result">
                <i class="fas fa-spinner fa-pulse fa-5x fa-fw"></i>
            </div>
        </div>
    </div>
</div>

    

</main>




<script src="/js/utils.js"></script>

<script src="/js/main.js"></script>

<script src="/js/header-shrink.js"></script>

<script src="/js/back2top.js"></script>

<script src="/js/dark-light-toggle.js"></script>



    
<script src="/js/local-search.js"></script>




    
<script src="/js/code-copy.js"></script>





<div class="post-scripts">
    
        
<script src="/js/left-side-toggle.js"></script>

<script src="/js/libs/anime.min.js"></script>

<script src="/js/toc.js"></script>

    
</div>



</body>
</html>
